﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace ExampleWcfService
{
    [ServiceContract]
    public interface IExampleService
    {
        [OperationContract]
        Order GetOrder(int id);
    }

    [DataContract]
    public class Order
    {
        [DataMember]
        public List<Product> Products { get; set; }
    }

    [DataContract]
    public class Product
    {
        [DataMember]
        public string ProductCode { get; set; }

        [DataMember]
        public string Name { get; set; }

        [DataMember]
        public decimal Price { get; set; }
    }
}
